package com.lizhiyu.flink.demo2_source;


import org.apache.flink.api.java.tuple.Tuple2;
import org.apache.flink.api.java.tuple.Tuple3;


/**
 * tuple 是用来存储信息的由于java中返回值只有一个,所以提供了个Tuple对象
 * Tuple 总共最多有25个泛型
 */
public class TupleDemo {
    public static void main(String[] args) {
        Tuple3<String,String,Integer> tuple3 = Tuple3.of("1","2",3);
        System.out.println(tuple3.f0);
        System.out.println(tuple3.f1);
        System.out.println(tuple3.f2);

        Tuple2<String,String> tuple2 = Tuple2.of("1","2");
        System.out.println(tuple2.f0);
        System.out.println(tuple2.f1);
    }
}
